//
// Copyright (c) 2024 BPer
//

#ifndef METAPLAYER3_BPERAUDIOANDROID_H
#define METAPLAYER3_BPERAUDIOANDROID_H
#include <bperutil/BPerType.h>

typedef void (*bPer_audioAndroid_record_callback)(uint8_t* data,int32_t nb,void* user);

struct BPerAudioAndroid {
    void* context;

    int32_t (*setPlayRate)(void* context,int rateChange);
    int32_t (*getInputdataCount)(void* context);
    uint32_t (*audioOut)(void* context, uint16_t *buffer,uint32_t size);
    double (*getTimestamp)(void* context);

};
int32_t bPer_create_audioAndroid_play(BPerAudioAndroid* aa,int32_t sample,int32_t channels);
int32_t bPer_create_audioAndroid_record(BPerAudioAndroid* aa,bPer_audioAndroid_record_callback callback,void* user,int32_t sample,int32_t channels);
void bPer_destroy_audioAndroid(BPerAudioAndroid* aa);

#endif //METAPLAYER3_BPERAUDIOANDROID_H
